package com.xxxy.controller;

import com.alibaba.csp.sentinel.annotation.SentinelResource;
import com.xxxy.blockhandler.MonitorBlockHandler;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class MonitorController {
    @GetMapping(value = "/monitor/hello")
@SentinelResource(value = "helloResource",blockHandler = "helloBlockHandler",blockHandlerClass = MonitorBlockHandler.class)
   public String hello(){
        return "hello sentinel";

    }

}
